package com.googlecode.gwt.commons.logging.gwtlog;

import org.apache.commons.logging.impl.AbstractLogger;

import com.allen_sauer.gwt.log.client.Log;

public class GWTLogLogger extends AbstractLogger{
	
	public GWTLogLogger() {
		super();
	}

	public void init(String name) {
		this.loggerName=name;
	}

	public void debug(Object message) {
		Log.debug(String.valueOf(message));
	}

	public void debug(Object message, Throwable t) {
		Log.debug(String.valueOf(message),t);
	}

	public void error(Object message) {
		Log.error(String.valueOf(message));
	}

	public void error(Object message, Throwable t) {
		Log.error(String.valueOf(message),t);
	}

	public void fatal(Object message) {
		Log.fatal(String.valueOf(message));
	}

	public void fatal(Object message, Throwable t) {
		Log.fatal(String.valueOf(message),t);
	}

	public void info(Object message) {
		Log.info(String.valueOf(message));
	}

	public void info(Object message, Throwable t) {
		Log.info(String.valueOf(message),t);
	}

	public boolean isDebugEnabled() {
		return Log.isDebugEnabled();
	}

	public boolean isErrorEnabled() {
		return Log.isErrorEnabled();
	}

	public boolean isFatalEnabled() {
		return Log.isFatalEnabled();
	}

	public boolean isInfoEnabled() {
		return Log.isInfoEnabled();
	}

	public boolean isTraceEnabled() {
		return false;
	}

	public boolean isWarnEnabled() {
		return Log.isWarnEnabled();
	}

	public void trace(Object message) {
		debug(message);
	}

	public void trace(Object message, Throwable t) {
		debug(message, t);
	}

	public void warn(Object message) {
		Log.warn(String.valueOf(message));
	}

	public void warn(Object message, Throwable t) {
		Log.warn(String.valueOf(message),t);
	}
	

}
